import re

text = "E:柴胡、黄芩、黄芪、半夏、甘草、生姜、大枣 参考答案：C"

pattern = re.compile(
    r'[0-9].*?(?=[A-Z]|$)|[A-Z]:.*?(?=[A-Z]|$|参考答案)|参考答案.*?[A-Z]')
matches = re.findall(pattern, text)
print(matches)

# 打印所有匹配项
for match in matches:
    print(match)